home *** CD-ROM | disk | FTP | other *** search
-
-
-
- MMMMKKKKTTTTEEEEMMMMPPPP((((3333CCCC)))) MMMMKKKKTTTTEEEEMMMMPPPP((((3333CCCC))))
-
-
-
- NNNNAAAAMMMMEEEE
- mktemp, mkstemp - make a unique file name
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
-
- cccchhhhaaaarrrr ****mmmmkkkktttteeeemmmmpppp ((((cccchhhhaaaarrrr ****tttteeeemmmmppppllllaaaatttteeee))));;;;
-
- iiiinnnntttt mmmmkkkksssstttteeeemmmmpppp((((cccchhhhaaaarrrr ****tttteeeemmmmppppllllaaaatttteeee))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _M_k_t_e_m_p replaces the contents of the string pointed to by _t_e_m_p_l_a_t_e by a
- unique file name, and returns the address of _t_e_m_p_l_a_t_e. The string in
- _t_e_m_p_l_a_t_e should look like a file name with six trailing XXXXs; _m_k_t_e_m_p will
- replace the XXXXs with a string that can be used to create a unique file
- name.
-
- _M_k_s_t_e_m_p makes the same replacement to the template but returns a file
- descriptor for the template file open for reading and writing. _M_k_s_t_e_m_p
- avoids the race between testing whether the file exists and opening it
- for use.
-
- The _m_k_s_t_e_m_p routine is from the 4.3BSD standard C library.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- getpid(2), tmpfile(3S), tmpnam(3S).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- _M_k_t_e_m_p will assign a zero to the first character of _t_e_m_p_l_a_t_e if it cannot
- create a unique name, returning the empty string.
-
- _M_k_s_t_e_m_p returns an open file descriptor upon success. It returns -1 if
- no suitable file could be created.
-
- CCCCAAAAVVVVEEEEAAAATTTT
- _M_k_t_e_m_p makes 26 attempts to generate a filename which is not currently in
- use from a given _t_e_m_p_l_a_t_e. Since the filename generated uses the process
- ID as a base, it is highly unlikely that these names will conflict with
- those generated by another process. Variation in the contents of the
- actual string given to _m_k_t_e_m_p, as well as the number of times _m_k_t_e_m_p is
- called, will determine the likelihood of successfully generating a unique
- name.
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-